package net.sourceforge.wurfl.core.request.normalizer.specific;

import net.sourceforge.wurfl.core.request.normalizer.UserAgentNormalizer;

public class FirefoxNormalizer implements UserAgentNormalizer {

	
	/**
	 * Return the firefox string with the major and minor version only  
	 *
	 * @param userAgent
	 * @return String
	 */
	public String normalize(String userAgent) {
		return firefoxWithMajorAndMinorVersion(userAgent);
	}
	
	private String firefoxWithMajorAndMinorVersion(String userAgent) {
		int index = userAgent.indexOf("Firefox");
		return userAgent.substring(index, index+11 );
	}
	
	

}
